package bairui.international.console.web.controller.barter.category.properties;

import javax.servlet.http.HttpServletRequest;

import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.servlet.ModelAndView;

import com.lianjing.sh.project.config.web.Project_Config_Web_PageTemplate;
import com.lianjing.sh.spring.web.controller.base.action.Action;
import com.lianjing.sh.spring.web.controller.enhance.module.context.ModuleContext;
import com.lianjing.sh.spring.web.controller.enhance.navigations.context.NavigationContext;

import bairui.international.console.web.controller.barter.category.properties.item.C_Barter_Category_PropertiesItemDetail_PageAccess;

/**
 *
 * 属性详情
 *
 * @generated
 * 
 * @see STest_C_Barter_Category_PropertiesDetail_PageAccess 测试
 *
 */
@Controller
public class C_Barter_Category_PropertiesDetail_PageAccess
 extends SC_Barter_Category_PropertiesDetail_PageAccess 
{
	
	/**
	 * 访问分页列表页面
	 */
	@Action(PageAccess.class)
	@GetMapping(PageAccess.RequestMappingValue)
	public ModelAndView pageAccess(
		ModelMap map, HttpServletRequest request,
		NavigationContext navigationContext, ModuleContext moduleContext, 
		@PathVariable(name=PageAccess.PathVariableName.CategoryId) long categoryId
	) throws Exception {
		/* 模块 */
		moduleContext
			.addModule(module_PropertiesDetail.module(
					new C_Barter_Category_PropertiesDetail_Page.Page.Operate(){
						@Override public Object getCategoryId() { return categoryId; }
					}, 
					new C_Barter_Category_PropertiesAdd_PageAccess.PageAccess.Operate(){
						@Override public Object getCategoryId() { return categoryId; }
					}, 
					new C_Barter_Category_PropertiesDelete_Deletes.Deletes.Operate(){
						@Override public Object getCategoryId() { return categoryId; }
					}, 
					new C_Barter_Category_PropertiesEdit_EditAccess.EditAccess.Operate(){
						@Override public Object getCategoryId() { return categoryId; }
						@Override public Object getPropertyId() { return "{{:id}}"; }
					}, 
					new C_Barter_Category_PropertiesItemDetail_PageAccess.PageAccess.Operate(){
						@Override public Object getCategoryId() { return categoryId; }
						@Override public Object getPropertyId() { return "{{:id}}"; }
					}
				));
		//
		return Project_Config_Web_PageTemplate.Admin_Common(request);
	}
	

}
